The following table lists the PostgreSQL databases that can be created during the installation of the WEM application. Certain databases are only created if their respective functionality is enabled in the application. Refer to the Determining Available Databases section of this chapter for information on determining which databases have been created.
Caution: To ensure proper operation and data integrity, the PostgreSQL database instances installed with the WEM should only be used by the application.
Important: Unless otherwise specified, all information in this chapter applies to both Sun Solaris- and Red Hat Enterprise Linux-based WEM systems.
Step 1 Go to the “bin” sub-directory of the PostgreSQL installation directory (/<ems_dir>/postgresx.x.x/ by default) by entering the following command:
Step 2 ./psql -U postgres_name template1postgres_name is the name of the PostgreSQL database administrator (postgres by default).The removal of these “old” records is done by “vacuuming” the database using the PostgreSQL vacuumdb command.Caution: Database vacuuming should only be performed at a time when there are minimal database transactions. Typically, this would correspond to a time frame in which no configurations are being performed, infrequent alarm updates, and/or infrequent bulk statistics transfers. Before vacuuming the database, the server must check for already running vacuuming. If this is already running, then the next scheduled vacuum process must be skipped. Hence, WEM must execute only one vacuum query at a time for every database.
Periodic, automatic database vacuuming can be performed through the configuration of a text file as described in the Configuring Automated Periodic Database Vacuuming section that follows. This is the preferred method. One-time automatic vacuuming can be performed through the use of the UNIX cron application as described in the Using Cron to Automate Database Vacuuming section. Vacuuming can also be performed manually as described in the Manually Vacuuming WEM Databases section.The WEM application contains a configuration file called vacuum.cfg that contains parameters related to database vacuuming operation and frequency. The file is located in the /<ems_dir>/server/etc directory by default.
• VACUUM ANALYZE: Performs the vacuum function as described previously in this chapter but also collects statistics about the proportions of duplicate values within a column and the min/max value.
• VACUUM: Performs only the vacuum function.
• VACUUM FULL: Physically reorders the tables. This requires an exclusive lock on each table while it is being processed. * Any non-zero number specified for a database in the Database Name section supersedes the CompleteDB parameter setting for the database. For example, if the start value for the Configuration database is 13 and the databases corresponding CompleteDB parameter is set to 0, then vacuuming is to be done for the entire database and all of the tables. However, if there is a conflict between the start times specified for any of the tables within the database and that specified for the database itself, vacuuming will not be started for that table.From the above example, you can see that the vacuumdb command is located in the bin sub-directory of the PostgreSQL installation directory (/<ems_dir>/postgresx.x.x by default). The -U parameter indicates the PostgreSQL database administrator name (postgres by default).
Step 1 Ensure that the database(s) are backed-up prior to vacuuming. Refer to the Backing-up WEM Databases section of this chapter for information on performing a database backup.
Step 2 Go to the “bin” sub-directory of the Postgres installation directory (/<ems_dir>/postgresx.x.x/ by default) by entering the following command:
The name of the database to be vacuumed. Refer to the Determining Available Databases section of this chapter for information on determining which databases are available.Caution: Database backups should only be performed at a time when there are minimal database transactions. Typically, this would correspond to a time frame in which no configurations are being performed, alarm updates are infrequent, and/or infrequent bulk statistics transfers are occurring.
The database backup creates compressed (.gz) files that are saved to the <emsdir>/server/flash/backup_<periodicity>_<date+time>/ems_backup directory. For example: /ems/server/flash/backup_DAILY_20110419153530/ems_backup.These files contains records from the various tables available in the databases. In the event of data corruption or loss, these files can be used to restore the information by using the restoreDb.sh script in the <ems dir>/server/scripts directory.
Step 2 On the WEM menu bar, click Configuration.
Step 3 Click System.
Step 4 Click WEM Database Periodic Backup.The WEM Database Periodic Backup Configuration Dialog Box appears.
Step 5 Make the desired Backup Date, Recurrence Pattern and Range of Recurrence entries for WEM database backups. For details on the required entries, click Help.
Step 6 Once you have made the required backup configuration entries, click Apply to activate your settings.WEM saves the database backup to the <emsdir>/server/flash/backup_<periodicity>_<date+time>/ems_backup directory.
This option is also used with the backup script backup.sh. It restores the WEM databases. No extra parameters are required for restoring the database other than the ‘restore’ keyword. The script itself will prompt for more parameters such as postgres directory path, backup file location, etc.
|
| Cisco Systems Inc. |
| Tel: 408-526-4000 |
| Fax: 408-527-0883 |